{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "844103ed",
   "metadata": {},
   "source": [
    "## NLP(自然语言处理）"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9274a5bf",
   "metadata": {},
   "source": [
    "### 1.什么是自然语言处理？     \n",
    "* 1.Machin Translation（机器翻译）：谷歌、有道翻译      \n",
    "* 2.Chinese word segmentation（中文自动分词）      \n",
    "* 3.Question Answering（问答系统）：openai、文心一言     \n",
    "* 4.Information Extracting（信息抽取）      \n",
    "* 5.Reading comprehension（阅读理解）      \n",
    "* 6.Automatic summarization(自动摘要)       \n",
    "* 7.Text categorization（文本分类)      \n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3efed809",
   "metadata": {},
   "source": [
    "### 2.计算机也能理解语言吗？      \n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "91a01cdb",
   "metadata": {},
   "source": [
    "### 3.词向量是什么？"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2f03d3df",
   "metadata": {},
   "source": [
    "## 百度AI实践"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "32248ca1",
   "metadata": {},
   "source": [
    "* 1.自然语言处理文本信息（实践）      \n",
    "* 2.自然语言生成文本信息（实践）"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "034d8803",
   "metadata": {},
   "source": [
    "## 对话机器人        "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b50ecba3",
   "metadata": {},
   "source": [
    "* 1.对话机器人（实践）"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e99f7d11",
   "metadata": {},
   "source": [
    "## OpenAI接入教程    \n",
    "* 链接(https://www.bilibili.com/video/BV1rs4y187gi/?spm_id_from=333.337.search-card.all.click&vd_source=79597b80e427bf7da87d79b5fa58a48e)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "ef9fac33",
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests,json\n",
    "url = 'http://openapi.turingapi.com/openapi/api/v2'\n",
    "data = {\n",
    "    \"reqType\":0,\n",
    "    \"perception\": {\n",
    "        \"inputText\": {\n",
    "            \"text\": \"聊点什么呢\"\n",
    "        },\n",
    "        \"inputImage\": {\n",
    "            \"url\": \"\"\n",
    "        },\n",
    "\n",
    "    },\n",
    "    \"userInfo\": {\n",
    "        \"apiKey\": \"d5d5bb66f66d4da8bedb378df7adfa70\",\n",
    "        \"userId\": \"111\"\n",
    "    }\n",
    "}\n",
    "\n",
    "r = requests.post(url,json.dumps(data))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9bf6c865",
   "metadata": {},
   "outputs": [],
   "source": [
    "r"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
